<template>
    <div>
        <el-table :data="messages" style="width: 100%">
            <el-table-column prop="send_time" label="日期" width="180"></el-table-column>
            <el-table-column prop="sender" label="发送人" width="180"></el-table-column>
            <el-table-column prop="msg" label="消息"></el-table-column>
        </el-table>
        <el-row>
            <el-button @click="getRecentMessage">刷新</el-button>
        </el-row>
    </div>
</template>

<script>
import { mapState, mapActions } from 'vuex'

export default {
  computed: mapState('message', [
    'messages',
    'status'
  ]),
  methods: mapActions('message', [
    'getRecentMessage'
  ]),
//   created() {
//       this.getRecentMessage()
//   }
}
</script>